<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_student_read.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/model_resp.js"></script>
<script src="${staticServer}/inc/js/datepicker.js"></script>
<script src="${staticServer}/inc/js/htmlfilter.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/tips.js"></script>
<script src="${staticServer}/js/web/echarts.js"></script>
<script src="${staticServer}/js/web/esl.js"></script>
<style type="text/css">
#statelist label {
	display: block;
	float: left;
	width: 120px;
}
div#container table td {
    padding-left: 0px;
    padding-right: 0px;
    border: 1px solid #D0D0D0;
}
table tr>td {
    font-size: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 25px;
    height: 25px;
}
table tr[class=fields]>th {
    color: #A65BC1;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
}
</style>
<script>
$(function(){
});

function submit(){
	window.location.href="${contextPath}/statis/system_qudao_zhuanhua.htm?startTime="+$("#startTime").val()+"&source="+$("#source").val();
}
</script>
</head>

<body>
<input type="hidden" id="keyname" value="">
<input type="hidden" id="traId" value="">
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>咨询师模块</li>
			<li>&gt;</li>
			<li class="current">客户资源列表</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<!--
		<table class="form_table">
			<tr>
				<td>
					<div style="overflow: hidden;">
						<label><b>查询条件：</b></label>
						<label for="start_date">起始日期：</label>
						<input type="text" name="start_date" id="startTime" size="15" value="${startTime}" rel="DATE::Y-m-d" /> 
						<input type="button" value=" 查 询 " onclick="submit()" />
					</div>
				</td>
			</tr>
		</table>
		-->
		<table style="width:100%;">
			<tr class="fields">
				<th>来源渠道</th>
				<th>09:00-10:00</th>
				<th>10:00-11:00</th>
				<th>11:00-12:00</th>
				<th>12:00-13:00</th>
				<th>13:00-14:00</th>
				<th>14:00-15:00</th>
				<th>15:00-16:00</th>
				<th>16:00-17:00</th>
				<th>17:00-18:00</th>
				<th>18:00-19:00</th>
				<th>19:00-20:00</th>
				<th>20:00-21:00</th>
				<th>21:00-22:00</th>
				<th>22:00-23:00</th>
				<th>23:00-09:00</th>
			</tr>
			<#if list??>
				<#list list as list>
				<tr class="even_row">
					<td align="center">${list.name}</td>
					<td align="center">${list.jdsCount}</td>
					<td align="center">${list.sdsyCount}</td>
					<td align="center">${list.sydseCount}</td>
					<td align="center">${list.sedssCount}</td>
					<td align="center">${list.ssdssCount}</td>
					<td align="center">${list.ssdswCount}</td>
					<td align="center">${list.swdslCount}</td>
					<td align="center">${list.sldsqCount}</td>
					<td align="center">${list.sqdsbCount}</td>
					<td align="center">${list.sbdsjCount}</td>
					<td align="center">${list.sjdesCount}</td>
					<td align="center">${list.esdesyCount}</td>
					<td align="center">${list.esydeseCount}</td>
					<td align="center">${list.esedessCount}</td>
					<td align="center">${list.essdjiuCount}</td>
            	</tr>
            	</#list>
			</#if>
		</table>
		<br/>
		<table style="width:100%;">
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;统计：
			<tr>
				<div id="week" style="height:400px"></div>
			</tr>
		</table>
		
		<table style="width:100%;">
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;统计：
			<tr>
				<div id="week2" style="height:400px"></div>
			</tr>
		</table>
	</div>
	<div class="emptyline"></div>
</body>
<script>

$(function(){
	$("#box input").click(function(){
		$("[name = chkItem]:checkbox").prop("checked", false);
		$(this).prop( "checked", true );
	});
});
	
	require.config({
        paths:{ 
            'echarts' : 'http://echarts.baidu.com/build/echarts',
            'echarts/chart/bar' : 'http://echarts.baidu.com/build/echarts'
        }
    });
    
    var week = [<#if list??><#list list as list>"${list.name}",</#list></#if>];
    var datas1 = [<#if list??><#list list as list>"${list.jdsCount}",</#list></#if>];
    var datas2 = [<#if list??><#list list as list>"${list.sdsyCount}",</#list></#if>];
    var datas3 = [<#if list??><#list list as list>"${list.sydseCount}",</#list></#if>];
    var datas4 = [<#if list??><#list list as list>"${list.sedssCount}",</#list></#if>];
    var datas5 = [<#if list??><#list list as list>"${list.ssdssCount}",</#list></#if>];
    var datas6 = [<#if list??><#list list as list>"${list.ssdswCount}",</#list></#if>];
    var datas7 = [<#if list??><#list list as list>"${list.swdslCount}",</#list></#if>];
    var datas8 = [<#if list??><#list list as list>"${list.sldsqCount}",</#list></#if>];
    var datas9 = [<#if list??><#list list as list>"${list.sqdsbCount}",</#list></#if>];
    var datas10 = [<#if list??><#list list as list>"${list.sbdsjCount}",</#list></#if>];
    var datas11 = [<#if list??><#list list as list>"${list.sjdesCount}",</#list></#if>];
    var datas12 = [<#if list??><#list list as list>"${list.esdesyCount}",</#list></#if>];
    var datas13 = [<#if list??><#list list as list>"${list.esydeseCount}",</#list></#if>];
    var datas14 = [<#if list??><#list list as list>"${list.esedessCount}",</#list></#if>];
    var datas15 = [<#if list??><#list list as list>"${list.essdjiuCount}",</#list></#if>];
    // 周统计
    require(
        [
            'echarts',
            'echarts/chart/bar' // 使用柱状图就加载bar模块，按需加载
        ],
        function (ec) {
            // 基于准备好的dom，初始化echarts图表
            var myChart = ec.init(document.getElementById('week')); 
            
            var option = {
                tooltip: {
                    show: true
                },
                legend: {
                    data:['09:00-10:00','10:00-11:00','11:00-12:00','12:00-13:00','13:00-14:00','14:00-15:00','15:00-16:00','16:00-17:00','17:00-18:00','18:00-19:00','19:00-20:00','20:00-21:00','21:00-22:00','22:00-23:00','23:00-09:00']   
                },
                xAxis : [
                    {
                        type : 'category',
                        data : week
                    }
                ],
                yAxis : [
                    {
                        type : 'value'
                    }
                ],
                series : [
                    {
                        "name":"09:00-10:00",
                        "type":"bar",
                        "data":datas1
                    },{
                        "name":"10:00-11:00",
                        "type":"bar",
                        "data":datas2
                    },{
                        "name":"11:00-12:00",
                        "type":"bar",
                        "data":datas3
                    },{
                        "name":"12:00-13:00",
                        "type":"bar",
                        "data":datas4
                    },{
                        "name":"13:00-14:00",
                        "type":"bar",
                        "data":datas5
                    },{
                        "name":"14:00-15:00",
                        "type":"bar",
                        "data":datas6
                    },{
                        "name":"15:00-16:00",
                        "type":"bar",
                        "data":datas7
                    },{
                        "name":"16:00-17:00",
                        "type":"bar",
                        "data":datas8
                    },{
                        "name":"17:00-18:00",
                        "type":"bar",
                        "data":datas9
                    },{
                        "name":"18:00-19:00",
                        "type":"bar",
                        "data":datas10
                    },{
                        "name":"19:00-20:00",
                        "type":"bar",
                        "data":datas11
                    },{
                        "name":"20:00-21:00",
                        "type":"bar",
                        "data":datas12
                    },{
                        "name":"21:00-22:00",
                        "type":"bar",
                        "data":datas13
                    },{
                        "name":"22:00-23:00",
                        "type":"bar",
                        "data":datas14
                    },{
                        "name":"23:00-09:00",
                        "type":"bar",
                        "data":datas15
                    }
                ]
            };
    
            // 为echarts对象加载数据 
            myChart.setOption(option); 
        }
    );
    
    //根据时间展示
    require.config({
        paths:{ 
            'echarts' : 'http://echarts.baidu.com/build/echarts',
            'echarts/chart/bar' : 'http://echarts.baidu.com/build/echarts'
        }
    });
    
    var jweek = [<#if jjiaList??><#list jjiaList as list>"${list.time}",</#list></#if>];
    var jdatas1 = [<#if jjiaList??><#list jjiaList as list>"${list.count1}",</#list></#if>];
    var jdatas2 = [<#if jjiaList??><#list jjiaList as list>"${list.count2}",</#list></#if>];
    var jdatas3 = [<#if jjiaList??><#list jjiaList as list>"${list.count3}",</#list></#if>];
    var jdatas4 = [<#if jjiaList??><#list jjiaList as list>"${list.count4}",</#list></#if>];
    var jdatas5 = [<#if jjiaList??><#list jjiaList as list>"${list.count5}",</#list></#if>];
    var jdatas6 = [<#if jjiaList??><#list jjiaList as list>"${list.count6}",</#list></#if>];
    var jdatas7 = [<#if jjiaList??><#list jjiaList as list>"${list.count7}",</#list></#if>];
    var jdatas8 = [<#if jjiaList??><#list jjiaList as list>"${list.count8}",</#list></#if>];
    var jdatas9 = [<#if jjiaList??><#list jjiaList as list>"${list.count9}",</#list></#if>];
    var jdatas10 = [<#if jjiaList??><#list jjiaList as list>"${list.count10}",</#list></#if>];
    // 周统计
    require(
        [
            'echarts',
            'echarts/chart/bar' // 使用柱状图就加载bar模块，按需加载
        ],
        function (ec) {
            // 基于准备好的dom，初始化echarts图表
            var myChart = ec.init(document.getElementById('week2')); 
            
            var option = {
                tooltip: {
                    show: true
                },
                legend: {
                    data:[<#if list??><#list list as list>"${list.name}",</#list></#if>]   
                },
                xAxis : [
                    {
                        type : 'category',
                        data : jweek
                    }
                ],
                yAxis : [
                    {
                        type : 'value'
                    }
                ],
                series : [
                    {
                        "name":"<#if list??><#list list as list><#if list_index==0>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas1
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==1>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas2
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==2>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas3
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==3>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas4
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==4>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas5
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==5>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas6
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==6>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas7
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==7>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas8
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==8>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas9
                    },{
                        "name":"<#if list??><#list list as list><#if list_index==9>${list.name}</#if></#list></#if>",
                        "type":"bar",
                        "data":jdatas10
                    }
                ]
            };
    
            // 为echarts对象加载数据 
            myChart.setOption(option); 
        }
    );
</script>
</html>